# -*- coding:utf-8 -*-
# CREATED BY: jiangbohuai
# CREATED ON: 2021/4/30 5:32 PM
# LAST MODIFIED ON:
# AIM:
import numpy as np


def txt_2_numpy(data_path: str) -> np.ndarray:
    with open(data_path, 'r') as f:
        data = f.read().splitlines()
    out = []
    for line in data:
        out.append([float(v) for v in line.split()])
    return np.array(out)
